package org.softmed.ATComm.sms;

import com.thoughtworks.xstream.XStream;

public class SMSXMLConverter {

	XStream streamer = new XStream();

	public SMSXMLConverter() {
		streamer.alias("sms", SMS.class);
		streamer.alias("sms-batch", SMSBatch.class);
		streamer.aliasField("sms-list", SMSBatch.class, "smsList");
	}

	public XStream getStreamer() {
		return streamer;
	}

	public String toXML(Object object)
	{
		return streamer.toXML(object);
	}
	
	public Object fromXML(String xml)
	{
		return streamer.fromXML(xml);
	}
	
}
